package com.cf.enums;

import lombok.Data;
import lombok.Getter;

@Getter
public enum Area {
    BJS(1, "北京市"),
    TJS(2, "天津市"),
    HBS(3, "河北省"),
    HNS(4, "河南省"),
    SDS(5, "山东省"),
    SXS(6, "山西省"),
    JSS(7, "江苏省"),
    AHS(8, "安徽省"),
    SHS(9, "上海市"),
    SXS1(10, "陕西省"),
    HBS1(11, "湖北省"),
    HNS1(12, "湖南省"),
    HLJ(13, "黑龙江省"),
    JLS(14, "吉林省"),
    LNS(15, "辽宁省"),
    ZJS(16, "浙江省"),
    FJS(17, "福建省"),
    JXS(18, "江西省"),
    CQS(19, "重庆市"),
    SCS(20, "四川省"),
    GZS(21, "贵州省"),
    GDS(22, "广东省"),
    GXS(23, "广西壮族自治区"),
    YNS(24, "云南省"),
    HNS2(25, "海南省"),
    GSS(26, "甘肃省"),
    QHS(27, "青海省"),
    XJS(28, "新疆维吾尔自治区"),
    NMG(29, "内蒙古自治区"),
    XZZ(30, "西藏自治区"),
    NXZ(31, "宁夏回族自治区"),
    XGQ(32, "香港特别行政区"),
    AMQ(33, "澳门特别行政区"),
    TWS(34, "台湾省");

    private int id;

    private String name;

    private Area(int id, String name){
        this.id = id;
        this.name = name;
    }

    public static Area of(int id){
        Area[] areas = Area.values();
        for(Area area:areas){
            if(area.id == id){
                return area;
            }
        }
        return null;
    }
}
